package com.evola.dbsm.service
{

	import com.evola.dbsm.communication.CommandObject;
	import com.evola.dbsm.communication.CommandObjectFactory;
	
	import mx.collections.ArrayList;
	import mx.collections.IList;


	public class CommandWrapper
	{
		public function CommandWrapper()
		{
		}

		private var commands:IList=new ArrayList();

		public function addCommandToExecute(commandName:String, data:Object):CommandWrapper
		{
			var command:CommandObject = CommandObjectFactory.createCommandObject(commandName, data);
			commands.addItem(command);
			return this;
		}

		public function getCommands():IList
		{
			return commands;
		}
	}
}